package service

import (
	"context"

	pb "manage/api/course"
	"manage/app/course/internal/biz"
)

type CourseServiceService struct {
	pb.UnimplementedCourseServiceServer

	bz *biz.CourseCase
}

func NewCourseServiceService(bz *biz.CourseCase) *CourseServiceService {
	return &CourseServiceService{
		bz: bz,
	}
}

func (s *CourseServiceService) CreateCourse(ctx context.Context, req *pb.CreateCourseRequest) (*pb.CreateCourseResponse, error) {
	return s.bz.Create(ctx, req)
}
func (s *CourseServiceService) DeleteCourse(ctx context.Context, req *pb.DeleteCourseRequest) (*pb.DeleteCourseResponse, error) {
	return s.bz.Delete(ctx, req)
}
func (s *CourseServiceService) UpdateCourse(ctx context.Context, req *pb.UpdateCourseRequest) (*pb.UpdateCourseResponse, error) {
	return s.bz.Update(ctx, req)
}
func (s *CourseServiceService) GetCourse(ctx context.Context, req *pb.GetCourseRequest) (*pb.GetCourseResponse, error) {
	return s.bz.Get(ctx, req)
}
